export default {
  name: 'ZengModal',
  props: {
    visible: Boolean,
    domType: {
      type: String, // 'a-modal', 'a-drawer'
      default: 'a-drawer'
    }
  },
  methods: {
    onCancel () {
      this.$emit('update:visible', false)
    }
  },
  render () {
    // const ZengDom = this.domType
    return (
      <this.domType
        {...{ props: this.$attrs }}
        visible={this.visible}
        onCancel={this.onCancel}
        onClose={this.onCancel}
      >
        {this.$slots.default}
      </this.domType>
    )
  }
}
